package com.chuqiyun.authorization.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * 产品(Product)表实体类
 *
 * @author mryunqi
 * @since 2023-04-19 17:07:26
 */
@EqualsAndHashCode(callSuper = true)
@TableName(value = "Product")
@Data
public class Product extends Model<Product> {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    //商品名
    private Integer commodityId;
    //用户唯一uuid
    private String userUuid;
    //产品名
    private String name;
    //授权码
    private String productCode;
    //授权数据
    private String authData;
    private Integer state;
    //开通日期
    private Long openingDate;
    //过期日期
    private Long expirationDate;


    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    public Serializable pkVal() {
        return this.id;
    }
    }

